/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package util;

import java.sql.*;

 
public class ConnectToMySql {

    final static String strClass = "com.mysql.jdbc.Driver";
    final static String strDatabase = "jdbc:mysql://localhost:3306/dbbanvetau?useUnicode=yes&characterEncoding=UTF-8";
    final static String strUser = config.user;
    final static String strPassword = config.password;

    public static Connection getConnection() throws ClassNotFoundException, InstantiationException, IllegalAccessException, SQLException {
        Connection conn = null;

        Class.forName(strClass).newInstance();
        conn = DriverManager.getConnection(strDatabase, strUser, strPassword);

        return conn;
    } 
}